home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-9.10-netbook-remix-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / python2.6-minimal.prerm < prev    next >
Text File  |  2009-11-02  |  1KB  |  45 lines

  1. #! /bin/sh -e
  2.  
  3. syssite=/usr/lib/python2.6/site-packages
  4. localsite=/usr/local/lib/python2.6/dist-packages
  5.  
  6. case "$1" in
  7.     remove)
  8.     if [ "$DEBIAN_FRONTEND" != noninteractive ]; then
  9.         echo "Unlinking and removing bytecode for runtime python2.6"
  10.     fi
  11.     for hook in /usr/share/python/runtime.d/*.rtremove; do
  12.         [ -x $hook ] || continue
  13.         $hook rtremove python2.6 || continue
  14.     done
  15.     dpkg -L python2.6-minimal \
  16.         | awk '/\.py$/ {print $0"c\n" $0"o"}' \
  17.         | xargs rm -f >&2
  18.  
  19.     if which update-binfmts >/dev/null; then
  20.         update-binfmts --package python2.6 --remove python2.6 /usr/bin/python2.6
  21.     fi
  22.  
  23.     if [ -h $syssite ]; then
  24.         rm -f $syssite
  25.     fi
  26.     [ -d $localsite ] && rmdir $localsite 2>/dev/null || true
  27.     [ -d $(dirname $localsite) ] && rmdir $(dirname $localsite) 2>/dev/null || true
  28.         ;;
  29.     upgrade)
  30.         dpkg -L python2.6-minimal \
  31.         | awk '/\.py$/ {print $0"c\n" $0"o"}' \
  32.         | xargs rm -f >&2
  33.         ;;
  34.     deconfigure)
  35.         ;;
  36.     failed-upgrade)
  37.         ;;
  38.     *)
  39.         echo "prerm called with unknown argument \`$1'" >&2
  40.         exit 1
  41.     ;;
  42. esac
  43.  
  44.  
  45.